<?php

/* @var $this yii\web\View */

use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;
use dosamigos\datepicker\DatePicker;

$this->title = '修改K线单日数据';
$this->params['breadcrumbs'][] = $this->title;

?>
<!-- page title -->
<div class="page-title">
  <div>
    <h1><i class="fa fa-area-chart"></i> 修改K线单日数据</h1>
    <ul class="breadcrumb side">
      <li><i class="fa fa-home fa-lg"></i></li>
      <li>NEA走势图</li>
      <li><a href="<?=Url::toRoute('site/editkline')?>">编辑K线数据</a></li>
      <li class="active"><a href="#">修改K线单日数据</a></li>
    </ul>
  </div>
</div>
<!-- page title end-->

<!-- page body start -->
<div class="card">
<?php $form = ActiveForm::begin(); ?>
    <?php
      if(isset($tip)&&$tip===true){
        if($model->hasErrors()){
    ?>
          <div class="alert alert-danger" role="alert">
            <?php
                foreach($model->getErrors("") as $key=>$value){
                  echo $value."<br>";
                }
            ?>
          </div>
    <?php
        }else{
    ?>
          <div class="alert alert-success" role="alert">修改成功！<a href="<?=Url::toRoute('site/neazoushi')?>">预览NEA基金走势图</a></div>
    <?php
        }
      }
    ?>
    <?= $form->field($model, 'data_date')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'9999/99/99']) ?>
    <?= $form->field($model, 'data_open')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'(9{1,9}.9{1,2}|9{1,9})']) ?>
    <?= $form->field($model, 'data_close')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'(9{1,9}.9{1,2}|9{1,9})']) ?>
    <?= $form->field($model, 'data_lowest')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'(9{1,9}.9{1,2}|9{1,9})']) ?>
    <?= $form->field($model, 'data_highest')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'(9{1,9}.9{1,2}|9{1,9})']) ?>
    <?= $form->field($model, 'data_amount')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'(9{1,9}.9{1,2}|9{1,9})']) ?>
    <?= $form->field($model, 'data_base')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'(0.09{0,3}|-0.09{0,3})']) ?>

    <div class="animated-checkbox">
      <label class="semibold-text">
      <?= $form->field($model, 'is_fenhong_point')->checkbox(['label' => '<span class="label-text">作为分红账户划拨点</span>']) ?>
      </label>
    </div>


    <div class="form-group">
        <?= Html::submitButton('提交', ['class' => 'btn btn-warning']) ?>
    </div>

<?php ActiveForm::end(); ?>
</div>
<!-- page body end-->
